import Vue from 'vue'
import App from './App'

import pageHead from './components/page-head.vue'
import pageFoot from './components/page-foot.vue'
import moment from './util/moment'
import zutil from './util/util'

import store from './store'

Vue.config.productionTip = false

Vue.prototype.zutil = zutil;
Vue.prototype.moment = moment;

Vue.prototype.$store = store
Vue.prototype.$backgroundAudioData = {
	playing: false,
	playTime: 0,
	formatedPlayTime: '00:00:00'
}

Vue.filter('date', function (value, formatString) {
  formatString = formatString || 'YYYY-MM-DD';
  return moment(value).format(formatString);
})
Vue.filter('retzTrue', function (value) {
  return Math.abs(value);
})

Vue.component('page-head',pageHead)
Vue.component('page-foot',pageFoot)

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
